package com.mars.diancan.exception;

import com.mars.diancan.common.ResultEnum;
import lombok.Getter;

/**
 * 点餐异常类
 * @author MARS
 * @date 2018/6/25
 */
@Getter
public class DiancanException extends RuntimeException{

    private Integer code;

    public DiancanException(ResultEnum resultEnum) {
        super(resultEnum.getMsg());
        this.code = resultEnum.getCode();
    }

    public DiancanException(Integer code,String message ) {
        super(message);
        this.code = code;
    }
}
